import { request } from 'umi'
import { ISkillAddItem, IskillListQuery, IInterviewListQuery } from '@/utils/interface';

// 获取专业列表
export let getSkillLable = () => {
    return request('/sxpt/station/selectStationLabel')
}

// 获取选中的岗位列表
export let getSkillList = (params: IskillListQuery) => {
    return request('/sxpt/station/selectStationVersionList', { params })
}

// 添加岗位
export let addPostSkill = (data: ISkillAddItem) => {
    return request('/sxpt/station', {
        method: 'POST',
        // params,  // 表示在url上面传参
        data    // 表示请求体
    })
}

// 获取岗位详情
export let getSkillDetail = (stationVersionId: string) => {
    return request(`/sxpt/station/selectStationListById/${stationVersionId}`)
}

// 获取选中的面试列表
export let getInterviewList = (params: IInterviewListQuery) => {
    return request('/sypt/interview/interviewList', { params })
}

// 获取选中的面试管理列表
export let getInterviewManage = (params: IInterviewListQuery) => {
    return request('/sypt/interview/interviewManage', { params })
}

// 获取面试详情
export let getInterviewDetail = (interviewId: string) => {
    return request(`/sypt/interview/info/${interviewId}`)
}

// 获取面试排行榜列表
export let getInterviewRecordRangkingTeacher = () => {
    return request('/sxpt/interview/interviewRecordRangkingTeacher')
}
export let getInterviewAnswerRangkingTeacher = () => {
    return request('/sxpt/interview/interviewAnswerRangkingTeacher');
};
// 添加计划
export let PlangetClassInfo = () => {
    return request('/sxpt/classPlan/getClassInfo/')
}
// 获取头像
export const getInfo1 = () => {
    return request(`/getInfo`)
}
// 全部已结束
export let classPlangetPlanList = (params: Object) => {
    return request(`/sxpt/classPlan/getPlanList`, {
        params,
    })
}
// 进页面获取数据
export let getClassInfo = () => {
    return request(`/sxpt/classPlan/getClassInfo`)
}
// 全部进行中
export let getPlanList = (params: Object) => {
    return request(`/sxpt/classPlan/getPlanList`, {
        params,
    })
}
// 未进行
export let PlangetPlanList = (params: Object) => {
    return request(`/sxpt/classPlan/getPlanList`, {
        params,
    })
}
// 删除
export let delect = (params:any)=>{
    return request(`/sxpt/classPlan/deleteClassPlan/${params}`)
}
